﻿@using BaBaoFan.Modifier.Model
@model CoinInfoCreareOrUpdateViewModel
@{
    ViewData["Title"] = "八宝饭数据修改器";
}
<div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding: 15px;">
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
            <legend>修改算法</legend>
        </fieldset>
        <form class="layui-form" action="/CoinInfo/Update" method="post">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">币种编号</label>
                    <div class="layui-input-inline">
                        <input type="text" asp-for="Id" lay-verify="required" readonly autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">币种名字</label>
                    <div class="layui-input-inline">
                        <input type="text" asp-for="CoinName" lay-verify="required" autocomplete="off" class="layui-input">
                        <span asp-validation-for="CoinName" class="text-danger"></span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">币种简写</label>
                    <div class="layui-input-inline">
                        <input type="text" asp-for="CoinShort" lay-verify="required" autocomplete="off" class="layui-input">
                        <span asp-validation-for="CoinShort" class="text-danger"></span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">算法类型</label>
                    <div class="layui-input-inline">
                        @Html.DropDownList("AlgorithmId", Model.AvaliableAlgorithms)
                        <span asp-validation-for="AlgorithmId" class="text-danger"></span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">矿机类型</label>
                    <div class="layui-input-inline">
                        @Html.DropDownList("CoinDevice", Html.GetEnumSelectList<MillType>())
                        <span asp-validation-for="CoinDevice" class="text-danger"></span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">是否获取到矿池数据</label>
                    <div class="layui-input-inline">
                        <input type="text" asp-for="CoinIsExcavate" autocomplete="off" class="layui-input">
                        <span asp-validation-for="CoinIsExcavate" class="text-danger"></span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">币种排序</label>
                    <div class="layui-input-inline">
                        <input type="text" asp-for="CoinSort" lay-verify="required" autocomplete="off" class="layui-input">
                        <span asp-validation-for="CoinSort" class="text-danger"></span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">上线时间</label>
                    <div class="layui-input-inline">
                        <input type="text" name="CoinTime" value="@Model.CoinTime.Value.ToString("yyyy-MM-dd")" id="date" lay-verify="date" autocomplete="off" class="layui-input">
                        <span asp-validation-for="CoinTime" class="text-danger"></span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">币种算力单位</label>
                    <div class="layui-input-inline">
                        <input type="text" asp-for="CoinUnit" lay-verify="required" autocomplete="off" class="layui-input">
                        <span asp-validation-for="CoinUnit" class="text-danger"></span>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">权重</label>
                    <div class="layui-input-inline">
                        <input type="text" asp-for="CoinWeight" lay-verify="required" autocomplete="off" class="layui-input">
                        <span asp-validation-for="CoinWeight" class="text-danger"></span>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" type="submit">立即提交</button>
                </div>
            </div>
        </form>
    </div>
</div>
<script>
    layui.use('form', function () {
        var form = layui.form;
        // laydate = layui.laydate;
    });

    layui.use('laydate', function () {
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#date' //指定元素
        });
    });
</script>
